import { http } from '@/utils/http.js'

/**
 * 问诊订单详情
 */
export const orderDetailApi = (orderId) => {
	return http.get('/patient/consult/order/detail', { params: { orderId } })
}

/**
 * 生成待支付订单
 */
export const createOrderApi = (data) => {
	return http.post('/patient/consult/order', data)
}

/**
 * 生成预支付订单
 */
export const preOrderApi = (type, options = {}) => {
	return http.get('/patient/consult/order/pre', {
		params: {
			type,
			...options,
		},
	})
}

/**
 * 医生科室列表
 */
export const departmentListApi = () => {
	return http.request({
		url: '/dep/all',
		method: 'GET',
	})
}
